<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="${document.title} + ' - 文档管理系统'">文档标题 - 文档管理系统</title>
    <link rel="stylesheet" href="/css/style.css">
</head>
<body>
    <header class="main-header">
        <div class="container">
            <h1>文档管理系统</h1>
            <nav>
                <ul>
                    <li><a href="/">主页</a></li>
                    <li><a href="/login" th:if="${#authorization.expression('!isAuthenticated()')}">登录</a></li>
                    <li><a href="/register" th:if="${#authorization.expression('!isAuthenticated()')}">注册</a></li>
                    <li><a href="/dashboard" th:if="${#authorization.expression('isAuthenticated()')}">个人中心</a></li>
                    <li><a href="/logout" th:if="${#authorization.expression('isAuthenticated()')}">退出</a></li>
                </ul>
            </nav>
        </div>
    </header>

    <main class="container">
        <article class="document-detail">
            <div class="document-header">
                <h1 th:text="${document.title}">文档标题</h1>
                <div class="document-meta">
                    <span th:text="${#temporals.format(document.createdAt, 'yyyy-MM-dd HH:mm')}">2025-03-13 16:30</span>
                </div>
            </div>
            
            <div class="document-content">
                <p th:text="${document.content}">文档内容...</p>
            </div>
            
            <div class="document-actions">
                <a href="/" class="btn btn-secondary">返回首页</a>
            </div>
        </article>
    </main>

    <footer class="main-footer">
        <div class="container">
            <p>&copy; 2025 文档管理系统. 保留所有权利.</p>
        </div>
    </footer>

    <script src="/js/script.js"></script>
</body>
</html> 